import request from '@/utils/request'

/**
 * 获取部门列表
 * @param params 
 * @returns 
 */
export const getDepartmentList = (params: any) => request.get({ url: '/adminapi/system.organize.department/lists', params })


/**
 * 添加部门
 * @param data 
 * @returns 
 */
export const addDepartment = (data: any) => request.post({ url: '/adminapi/system.organize.department/save', data })


/**
 * 编辑部门
 * @param data 
 * @returns 
 */
export const editDepartment = (data: any) => request.put({ url: '/adminapi/system.organize.department/update', data })

/**
 * 删除部门
 * @param id 
 * @returns 
 */
export const deleteDepartment = (id: number) => request.delete({ url: `/adminapi/system.organize.department/delete`, params: { id } })


/**
 * 获取部门列表
 * @param params 
 * @returns 
 */
export const getDepartmentLists = (params?: any) => request.get({ url: '/adminapi/system.organize.department/getDepartmentList', params })
